function [ quality ] = get_quality( dataset, ats, c )
%sillycost Wrap the quality function
%   dataset is the entire dataset that was loaded
%   ats is a list of time slots (the rows) with the columns the sensors

    % Create a list of all the sensors in all time slots
    sensors = union(reshape(ats, 1, []), []);
    sensors = setdiff(sensors, 0); % Remove the zero

    % Create the set of data for the sensors and the other set
    sensordata = [];
    otherdata = [];
    for i=1:size(dataset, 2)
        if (ismember(i, sensors))
            sensordata = [sensordata, dataset(:, i)];
        else
            otherdata = [otherdata, dataset(:, i)];
        end
    end
    
    quality = sensingQuality(sensordata, otherdata);

    % Apply the Fc check
    if (quality > c)
        quality = c;

end
